package com.cloud.zhimao.system.user.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.zhimao.common.base.pojo.entity.IBaseEntity;
import lombok.*;
import lombok.experimental.Accessors;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author Long
 */
@ToString
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName(value = "cloud_lost_user")
@Entity
@Table(name = "cloud_lost_user")
public class User extends IBaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @Column(name = "username", columnDefinition="varchar(32) COMMENT '用户名(QQ)'")
    private String username;

    @Column(name = "nickname", columnDefinition="varchar(32) COMMENT '昵称'")
    private String nickname;

    @Column(name = "avatar", columnDefinition="varchar(256) COMMENT '头像'")
    private String avatar;

    @Column(name = "password", columnDefinition="varchar(64) COMMENT '密码'")
    private String password;

    @Column(name = "open_id", columnDefinition="varchar(64) COMMENT 'OpenID'")
    private String openId;

    @Column(name = "email", columnDefinition="varchar(64) COMMENT '邮箱'")
    private String email;

    @Column(name = "status", columnDefinition="varchar(1) COMMENT '状态' DEFAULT '1'")
    private Integer status;

    public User(String openId){
        this.openId = openId;
    }
}
